//
//  XQOrderEmptyView.m
//  JoinPeso
//
//  Created by 小琦 on 2024/11/21.
//

#import "XQOrderEmptyView.h"

@interface XQOrderEmptyView()
@property (nonatomic,strong) UIImageView *emptyImageView;
@property (nonatomic,strong) UILabel *emptyLb;
@end

@implementation XQOrderEmptyView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self makeUI];
        [self makeConstraints];
    }
    return self;
}

- (void)makeUI {
    [self addSubview:self.emptyImageView];
    [self addSubview:self.emptyLb];
}

- (void)makeConstraints {
    [self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(@0);
        make.width.height.mas_equalTo(150);
    }];
    [self.emptyLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.emptyImageView);
        make.top.equalTo(self.emptyImageView.mas_bottom).offset(30);
        make.height.mas_equalTo(20);
        make.bottom.equalTo(@0);
    }];
}

#pragma mark - lazy

- (UIImageView *)emptyImageView {
    if (!_emptyImageView) {
        _emptyImageView = [[UIImageView alloc] init];
        _emptyImageView.image = [UIImage imageNamed:@"order_empty"];
    }
    return _emptyImageView;
}

- (UILabel *)emptyLb {
    if (!_emptyLb) {
        _emptyLb = [[UILabel alloc] init];
        _emptyLb.text = @"Nothing at all";
        _emptyLb.textColor = [UIColor colorWithHexString:@"#2A2D57"];
        _emptyLb.font = [UIFont systemFontOfSize:14];
    }
    return _emptyLb;
}

@end
